{% extends "base.html" %}

{% block title %}删除服务器 - 在线跑批系统{% endblock %}

{% block content %}
<div class="row justify-content-center">
    <div class="col-md-6">
        <div class="card border-danger">
            <div class="card-header bg-danger text-white">
                <h4 class="mb-0"><i class="fas fa-exclamation-triangle me-2"></i>确认删除</h4>
            </div>
            <div class="card-body">
                <h5 class="card-title">您确定要删除服务器 <span class="text-danger">{{ server.name }}</span> 吗？</h5>
                <p class="text-warning">警告：此操作将删除服务器的所有信息，包括关联的任务。此操作不可恢复！</p>
                <p><strong>服务器信息：</strong></p>
                <ul class="list-group mb-4">
                    <li class="list-group-item"><strong>名称：</strong>{{ server.name }}</li>
                    <li class="list-group-item"><strong>主机名/IP：</strong>{{ server.hostname }}</li>
                    <li class="list-group-item"><strong>端口：</strong>{{ server.port }}</li>
                    <li class="list-group-item"><strong>用户名：</strong>{{ server.username }}</li>
                </ul>
                <form method="post">
                    {% csrf_token %}
                    <div class="d-flex justify-content-between">
                        <button type="submit" class="btn btn-danger">
                            <i class="fas fa-trash me-1"></i>确认删除
                        </button>
                        <a href="{% url 'server_list' %}" class="btn btn-secondary">
                            <i class="fas fa-times me-1"></i>取消
                        </a>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
{% endblock %}
